//
//  ANGradientButton.m
//  WeiYiMei
//
//  Created by iMac on 2019/4/13.
//  Copyright © 2019年 liyefu. All rights reserved.
//

#import "ANGradientButton.h"
#import "UIImage+Color.h"

@implementation ANGradientButton

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setBackgroundImage:[UIImage gradientImageWithColorArray:@[(id)kColorGradientBegin.CGColor,(id)kColorGradientEnd.CGColor] beginPoint:CGPointMake(0, 0) endPoint:CGPointMake(frame.size.width, 0) rect:frame] forState:UIControlStateNormal];
    }
    return self;
}

@end
